package cn.bestick.cblog.dao.impl;

import java.sql.Connection;
import cn.bestick.cblog.util.DbUtil;

public class BaseDao {
	private DbUtil dbUtil = null;
	private Connection con = null;

	protected BaseDao() {
		dbUtil = new DbUtil();
	}

	protected Connection getCon() {
		try {
			con = this.dbUtil.getCon();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return con;
	}

	protected void close(Connection con) {
		try {
			this.dbUtil.closeCon(con);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
